#pragma once
#include "stdafx.h"
#include <iostream>
#include "d3dx9math.h"

void LOG_MESSAGE(char *title, char *msg)
{
	char* buf = new char[256];
	sprintf(buf, "%s%s", title, msg);
	OutputDebugString(buf);
	delete[] buf;
}

void PRINT_D3_VECTOR3(char* str, D3DXVECTOR3 vec)
{
	char* buf = new char[256];
	sprintf(buf, "%s=(%.4g, %.4g, %.4g)\n", str, vec.x, vec.y, vec.z);
	OutputDebugString(buf);
	delete[] buf;
}

void PRINT_D3_MATRIX(char* str, D3DXMATRIX mat)
{
	char* buf = new char[256];
	sprintf(buf, "%s:\n| %.4g, %.4g, %.4g, %.4g |\n| %.4g, %.4g, %.4g, %.4g |\n| %.4g, %.4g, %.4g, %.4g |\n| %.4g, %.4g, %.4g, %.4g |\n", str, mat.m[0][0], mat.m[0][1], mat.m[0][2], mat.m[0][3], mat.m[1][0], mat.m[1][1], mat.m[1][2], mat.m[1][3],
		mat.m[2][0], mat.m[2][1], mat.m[2][2], mat.m[2][3], mat.m[3][0], mat.m[3][1], mat.m[3][2], mat.m[3][3]);
	OutputDebugString(buf);
	delete[] buf;
}